This little program will shut off your Macintosh if you forget to turn it off.
This routine will prompt you for a time to shutoff the Mac. It simply compares the date string, which you enter, to the ASCII time record kept by the computer. It does not parse the string to see if it contains a valid time string. If the time string is invalid, the machine never shuts off.
System 7 users get a choice of two shutdown modes: hard and soft. System 6 users are only offered the hard version. In a hard shutdown, the program calls a toolbox routine that does little more than eject floppies and pull the plug. In a soft shutdown, the program sends a shutdown message to the Finder. The Finder then prompts all open applications to quit. If an application doesn't quit (because it hasn't saved some data), the shutdown doesn't occur. The soft shutdown is safer. The hard shutdown is more reliable.
The program is designed to run in the background. In System 7, it will switch itself to the background. In System 6, the user must bring the Finder or an application to the foreground. Every 5 seconds or so, the program wakes up, checks the time, and goes back to sleep. When the specified time arrives, it displays a dialog box for 15 seconds and gives the user a chance to abort.